import { parseTime } from '@/utils'
export const TableConfig = [
  { prop: 'name', label: '名称' },
  { prop: 'dataScope', label: '数据权限' },
  { prop: 'level', label: '角色级别' },
  { prop: 'description', label: '描述' },
  { prop: 'createTime', label: '创建日期', slots: [
    {
      render(h, vm, row) {
        const { createTime } = row
        return (<span>{parseTime(createTime)}</span>)
      }
    }
  ] },
  { label: '操作', width: '170',
    slots: [
      {
        render(h, vm, row) {
          return ([
            <el-button size='mini' type='primary' icon='el-icon-edit' onClick={ () => vm.$emit('editRole', row, '编辑角色')}/>,
            <el-button type='danger' icon='el-icon-delete' size='mini' onClick={() => vm.$emit('deletRole', row,)}/>
          ])
        }
      }
    ]
  }
]

